/**
 * @author Joseph
 */

var iconsId="#ap_icons"
var goodsId="#ap_goods"
$(document.body).append("<div id='ap_icons' style='display: none' ><img  id='eshop' class='icon'/><img   id='shoppingmall' class='icon'/></div>");
//$("img.icon").attr('src', chrome.extension.getURL("img/eshop.png"));
$("img.icon").attr('src', 'http://img.wdjimg.com/mms/icon/v1/e/89/9847a8b2fe9981ff42c2d2f280b9089e_256_256.png');
$(document.body).append("<div id='ap_goods' style='display: none' >" +
    "<ul id='ap_list'>" +
    "<li class='item'><a href='https://www.google.ca/search?q=官方旗舰店'>官方旗舰店</a> ￥2.5 <span class='stars4'></span></li>" +
    "<li class='item'><a href='https://www.google.ca/search?q=官方旗舰店'>官方旗舰店</a> ￥2.5 <span class='stars4'></span></li>" +
    "<li class='item'><a href='https://www.google.ca/search?q=官方旗舰店'>官方旗舰店</a> ￥2.5 <span class='stars4'></span></li>" +
    "<li class='item'><a href='https://www.google.ca/search?q=官方旗舰店'>官方旗舰店</a> ￥2.5 <span class='stars4'></span></li>" +
    "<li class='item'><a href='https://www.google.ca/search?q=官方旗舰店'>官方旗舰店</a> ￥2.5 <span class='stars4'></span></li>" +
    "<li class='item'><a href='https://www.google.ca/search?q=官方旗舰店'>官方旗舰店</a> ￥2.5 <span class='stars4'></span></li>" +
    "<li class='item'><a href='https://www.google.ca/search?q=官方旗舰店'>官方旗舰店</a> ￥2.5 <span class='stars4'></span></li>" +
    "<li class='item'><a href='https://www.google.ca/search?q=官方旗舰店'>官方旗舰店</a> ￥2.5 <span class='stars4'></span></li>" +
    "</ul>" +
    "</div>");

$("img.icon").hover(function(e){
    $(goodsId).offset({
        top:e.pageY-100,
        left:e.pageX-250
    }).slideDown(800)
});
$(goodsId).hover(function(){},
function (e){
  $(goodsId).slideUp(2000);
});